
package cn.zy.mydashboard;

import android.os.Bundle;
import android.view.View;

import java.util.Random;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        final DashboardView dbv = findViewById(R.id.dbv);
        findViewById(R.id.btn).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Random random = new Random();
                dbv.setDivideValue(random.nextInt(120));
            }
        });
    }
}
